package com.example.test.advice.第一章_java开发中常用的方法和准则.建议14_使用序列化类的私有方法巧妙解决部分属性持久化问题;

import java.io.Serializable;

public class Salary implements Serializable {
    private static final long serialVersionUID = -2440123900445258425L;
    //基本工资
    private int basePay;
    //绩效工资
    private int bonus;

    public Salary(int basePay, int bonus) {
        this.basePay = basePay;
        this.bonus = bonus;
    }

    public int getBasePay() {
        return basePay;
    }

    public void setBasePay(int basePay) {
        this.basePay = basePay;
    }

    public int getBonus() {
        return bonus;
    }

    public void setBonus(int bonus) {
        this.bonus = bonus;
    }
}
